package com.example.firstdemo

import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.ui.unit.dp
import androidx.navigation.NavGraph
import androidx.navigation.NavHostController
import androidx.navigation.createGraph
import com.example.firstdemo.ui.screens.pages.addProblem.addProblem.addDescription.addDescriptionDestination
import com.example.firstdemo.ui.screens.pages.addProblem.addProblem.addProblemDestination
import com.example.firstdemo.ui.screens.pages.addProblem.addProblem.selectCarriage.selectCarriageDestination
import com.example.firstdemo.ui.screens.pages.addProblem.addProblem.selectPosition.selectPositionDestination
import com.example.firstdemo.ui.screens.pages.addProblem.addProblem.selectProblem.selectProblemDestination
import com.example.firstdemo.ui.screens.pages.addProblem.addProblemDetail.addProblemDetailDestination
import com.example.firstdemo.ui.screens.pages.addProblem.addProblemList.AddProblem
import com.example.firstdemo.ui.screens.pages.addProblem.addProblemList.addProblemListDestination
import com.example.firstdemo.ui.screens.pages.handover.Handover
import com.example.firstdemo.ui.screens.pages.handover.handoverDestination
import com.example.firstdemo.ui.screens.pages.login.loginDestination
import com.example.firstdemo.ui.screens.pages.mine.Mine
import com.example.firstdemo.ui.screens.pages.mine.mineDestination
import com.example.firstdemo.ui.screens.pages.problem.problemDetail.problemDetailDestination
import com.example.firstdemo.ui.screens.pages.problem.problemList.ProblemList
import com.example.firstdemo.ui.screens.pages.problem.problemList.problemListDestination
import com.example.firstdemo.ui.screens.splash.Splash
import com.example.firstdemo.ui.screens.splash.splashDestination

val destinationWithBottomBarList = listOf(ProblemList, AddProblem, Handover, Mine)

fun getNavGraph(
    navController: NavHostController,
    padding: PaddingValues = PaddingValues(0.dp)
): NavGraph {
    return navController.createGraph(startDestination = Splash) {
        splashDestination(navController)

        loginDestination(padding, navController)

        problemListDestination(padding, navController)
        problemDetailDestination(padding, navController)

        addProblemListDestination(padding, navController)
        addProblemDestination(padding, navController)
        selectCarriageDestination(padding, navController)
        selectPositionDestination(padding, navController)
        selectProblemDestination(padding, navController)
        addDescriptionDestination(padding, navController)
        addProblemDetailDestination(padding, navController)

        handoverDestination(padding)
        mineDestination(padding, navController)
    }
}
